<?php


namespace support\utils;


use Webman\Context;

class ContextUtil extends Context
{
    static function getOrSet($key, $value)
    {
        if (!Context::has($key)) {
            if (is_callable($value)) {
                $value = call_user_func($value);
            }
            Context::set($key, $value);
        }
        return Context::get($key);
    }
}